package com.loong.nnm.entity.alarm;

import java.util.Locale;

/**
 * 告警信息（当期告警/历史告警）
 */
public class Alarm {
    private enum PerceivedSeverity{
        Critical,
        Major,
        Minor,
        Warning;

        @Override
        public String toString() {
            return this.name().toLowerCase(Locale.US);
        }
    }

    private enum AlarmState{
        start,end
    }

    //产生告警的对象标识
    private String objectName;
    //事件产生对象类型
    private String objectType;
    //告警编码
    private String alarmCode;
    //告警级别
    private PerceivedSeverity perceivedSeverity;
    //告警唯一定位号
    private int alarmSerialNo;
    //告警状态
    private AlarmState alarmState;
    //描述告警详细信息
    private String additionalText;
    //告警产生时间
    private String startTime;
    //告警结束时间
    private String endTime;

    @Override
    public String toString() {
        return "Alarm{" +
                "objectName='" + objectName + '\'' +
                ", objectType='" + objectType + '\'' +
                ", alarmCode='" + alarmCode + '\'' +
                ", perceivedSeverity=" + perceivedSeverity +
                ", alarmSerialNo=" + alarmSerialNo +
                ", alarmState=" + alarmState +
                ", additionalText='" + additionalText + '\'' +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                '}';
    }

    public String getObjectName() {
        return objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

    public String getObjectType() {
        return objectType;
    }

    public void setObjectType(String objectType) {
        this.objectType = objectType;
    }

    public String getAlarmCode() {
        return alarmCode;
    }

    public void setAlarmCode(String alarmCode) {
        this.alarmCode = alarmCode;
    }

    public PerceivedSeverity getPerceivedSeverity() {
        return perceivedSeverity;
    }

    public void setPerceivedSeverity(PerceivedSeverity perceivedSeverity) {
        this.perceivedSeverity = perceivedSeverity;
    }

    public int getAlarmSerialNo() {
        return alarmSerialNo;
    }

    public void setAlarmSerialNo(int alarmSerialNo) {
        this.alarmSerialNo = alarmSerialNo;
    }

    public AlarmState getAlarmState() {
        return alarmState;
    }

    public void setAlarmState(AlarmState alarmState) {
        this.alarmState = alarmState;
    }

    public String getAdditionalText() {
        return additionalText;
    }

    public void setAdditionalText(String additionalText) {
        this.additionalText = additionalText;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
